package D4;

public class Java04 {
    public static void main(String[] args) {
        //正则表达式初体验
        System.out.println(checkQQ("12345689678096"));

    }
    public static boolean checkQQ(String qq){
        //1、判断QQ是否为null
        if (qq == null || qq.startsWith("0") || qq.length() < 6 || qq.length() > 20){
            return false;
        }
        for (int i = 0; i < qq.length(); i++) {
            char ch = qq.charAt(i);
            if (ch < '0' || ch > '9'){
                return false;
            }
        }
        return true;
    }
}
